function mathmlDecode(element_id, html, body){
    if (!mathmlDecode.decoded) {
        var mathmlRexpGlobal = /&lt;math(\s+\w+="[\w\s:/.]*")*\s*&gt;(.|[\n\r])*?&lt;\/math&gt;/g;
        var mathmlRexp = /&lt;math(\s+\w+="[\w\s:/.]*")*\s*&gt;(.|[\n\r])*?&lt;\/math&gt;/;
        var mathmlStartRexp = /&lt;math(\s+\w+="[\w\s:/.]*")*\s*&gt;/g;
        var mathmlArray = html.match(mathmlRexpGlobal);
        if (mathmlArray instanceof Array) {
            for (var i = 0; i < mathmlArray.length; i++) {
                mathmlArray[i] = mathmlArray[i].replace(mathmlStartRexp, '<math xmlns="http://www.w3.org/1998/Math/MathML">');
                mathmlArray[i] = mathmlArray[i].replace(/&lt;/g, '<');
                mathmlArray[i] = mathmlArray[i].replace(/&gt;/g, '>');
                mathmlArray[i] = mathmlArray[i].replace(/&quot;/g, '"');
                mathmlArray[i] = mathmlArray[i].replace(/<\/p>/g, '');
                mathmlArray[i] = mathmlArray[i].replace(/<p>/g, '');
                mathmlArray[i] = mathmlArray[i].replace(/[\s\n\r\t\xA0]/g, '');
                mathmlArray[i] = mathmlArray[i].replace(/mathxmlns/g, 'math xmlns');
                mathmlArray[i] = mathmlArray[i].replace(/mfencedopen/g, 'mfenced open');
                mathmlArray[i] = mathmlArray[i].replace(/"close=/g, '" close=');
                mathmlArray[i] = mathmlArray[i].replace(/mfencedclose/g, 'mfenced close');
                mathmlArray[i] = mathmlArray[i].replace(/"open=/g, '" open=');
                mathmlArray[i] = mathmlArray[i].replace(/mspacewidth/g, 'mspace width');
                mathmlArray[i] = mathmlArray[i].replace(/mtdcolumnalign/g, 'mtd columnalign');
                html = html.replace(mathmlRexp, mathmlArray[i]);
            }
        }
        html = html.replace(/[\n\r\xA0]/g, '');
        mathmlDecode.decoded = true;
    }
    return html;
}